home *** CD-ROM | disk | FTP | other *** search
-
-
-
- SETFILETYPE C Library Procedures SETFILETYPE
-
-
-
- NNAAMMEE
- setfiletype - change advisory file type of file
-
- SSYYNNOOPPSSIISS
- sseettffiilleettyyppee((ppaatthh,, ttyyppee))
- cchhaarr **ppaatthh;;
- iinntt ttyyppee;;
-
- DDEESSCCRRIIPPTTIIOONN
- The file whose name is given by _p_a_t_h has its type changed to
- _t_y_p_e. Types are defined in <_f_s._h>.
- FS_USER_TYPE_UNDEFINED 0 no type set
- FS_USER_TYPE_TMP 1 temporary file
- FS_USER_TYPE_SWAP 2 swap file
- FS_USER_TYPE_OBJECT 3 object file
- FS_USER_TYPE_BINARY 4 executable
- FS_USER_TYPE_OTHER 5 file that doesn't correspond to any specific type
-
- The advisory file type is used by the system for statistics
- gathering. At some point in the future, it may be used for
- performance enhancements as well: for example, varying the
- amount of time allowed before flushing a file to disk,
- depending on the importance of not losing data from it.
-
- Only the owner of a file (or the super-user) may change its
- type.
-
- RREETTUURRNN VVAALLUUEE
- Upon successful completion, a value of 0 is returned. Oth-
- erwise, a value of -1 is returned and _e_r_r_n_o is set to indi-
- cate the error.
-
- EERRRROORRSS
- _S_e_t_f_i_l_e_t_y_p_e will fail and the file type will be unchanged
- if:
-
- [ENOTDIR] A component of the path prefix is not a
- directory.
-
- [EINVAL] The pathname contains a character with the
- high-order bit set.
-
- [ENAMETOOLONG] A component of a pathname exceeded 255 char-
- acters, or an entire path name exceeded 1023
- characters.
-
- [ENOENT] The named file does not exist.
-
- [EACCES] Search permission is denied for a component
- of the path prefix.
-
- [ELOOP] Too many symbolic links were encountered in
-
-
-
- Sprite v1.0 January 18, 1989 1
-
-
-
-
-
-
- SETFILETYPE C Library Procedures SETFILETYPE
-
-
-
- translating the pathname.
-
- [EPERM] The effective user ID does not match the
- owner of the file and the effective user ID
- is not the super-user.
-
- [EROFS] The named file resides on a read-only file
- system.
-
- [EFAULT] _P_a_t_h points outside the process's allocated
- address space.
-
- [EIO] An I/O error occurred while reading from or
- writing to the file system.
-
- SSEEEE AALLSSOO
- chown(2), stat(2)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Sprite v1.0 January 18, 1989 2
-
-
-
-